package com;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.graphics.Color;
import android.util.Log;
import android.widget.TextView;
import com.baidu.mapapi.SDKInitializer;

public class SDKReceiver extends BroadcastReceiver {
    private final String TAG = SDKReceiver.class.getCanonicalName();
    public void onReceive(Context context, Intent intent) {
        String s = intent.getAction();
        Log.d(TAG, "action: " + s);
        if (s != null) {
            if (s.equals(SDKInitializer.SDK_BROADTCAST_ACTION_STRING_PERMISSION_CHECK_ERROR)) {
                Log.d(TAG,"key 验证出错! 请在 AndroidManifest.xml 文件中检查 key 设置");
            } else if (s
                    .equals(SDKInitializer.SDK_BROADCAST_ACTION_STRING_NETWORK_ERROR)) {
                Log.d(TAG,"网络出错");
            }
        }
    }
}
